//package pers.xx.sbm.config;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.CommandLineRunner;
//import org.springframework.boot.SpringBootConfiguration;
//import org.springframework.core.env.Environment;
//
///**
// * @author ：xiexing
// * @description：springboot项目启动之后自动启动默认浏览器
// * @date ：2020/11/26 15:16
// */
//@SpringBootConfiguration
//public class AutoStartProjectInDefaultBrowser implements CommandLineRunner {
//    @Autowired
//    private Environment environment;
//
//    @Override
//    public void run(String... args) {
//        try {
//            Runtime.getRuntime().exec("cmd /c start http://localhost:" + environment.getProperty("server.port") + "/toLogin");
//        } catch (Exception ex) {
//            ex.printStackTrace();
//        }
//    }
//}